﻿using AutoMapper;
using BasicInformationWrite.API.BasicInformationCommons.CustomerProfilees;
using BasicInformationWrite.API.BasicInformationCommons.Departes;
using BasicInformationWrite.API.BasicInformationCommons.Materialss;
using BasicInformationWrite.API.BasicInformationCommons.suppliers;
using BasicInformationWrite.API.BasicInformationCommons.Warehousees;
using ERPSystem.Common.Domains.CustomerProfileCommon;
using ERPSystem.Common.Domains.Department;
using ERPSystem.Common.Domains.Material;
using ERPSystem.Common.Domains.PurchaseWarehousing;
using ERPSystem.Common.Domains.supplier;
using ERPSystem.Common.Domains.WarehouseCommon;

namespace BasicInformationWrite.API.BasicInformationWriteAutoMapper
{
    public class BasicInformationWriteAutoMappers : Profile
    {
        public BasicInformationWriteAutoMappers() 
        {
            //创建供应商新增的映射，由新增供应商的入参转换为供应商实体
            CreateMap<supplierCreateCommand, Supplier>();
            //创建仓库新增的映射，由新增仓库的入参转换为仓库实体
            CreateMap<WarehouseCreateCommand,Warehouse>();
            //创建客户档案新增的映射，由新增客户档案的入参转换为客户档案的实体
            CreateMap<CustomerProfileCreateCommand, CustomerProfile>();
            //创建物料基本档新增的映射，由新增物料基本档的入参转换为物料基本档的实体
            CreateMap<MaterialssCreateCommand, MaterialInformation>();
            //创建物料分类新增的映射，由新增物料分类的入参转换为物料分类的实体
            CreateMap<MaterialCascadeCreateCommand, MaterialCascade>();
            //创建部门新增的映射，由部门新增的入参转换为部门新增的实体
            CreateMap<DepartCreateCommand, Depart>();
            //创建采购订单新增的映射，由采购订单新增的入参转换为采购订单新增的实体
            CreateMap<PurchaseOrderCreateCommand, PurchaseOrder>();

            //创建采购入库订单新增的映射，由采购入库订单新增的入参转换为采购入库订单新增的实体
            CreateMap<PurchaseIncomingMaterialsCreateCommand, PurchaseWarehousing>();
            //创建采购到货单新增的映射，由采购到货单新增的入参转换为采购到货单新增的实体
            CreateMap<PurchasedGoodsCreateCommomand, PurchasedGoods>();
        }

    }
}
